/*
 * @Author       : shenqing
 * @desc         : 项目基础混合器
 * @Date         : 2022-10-10 17:52:28
 * @LastEditTime : 2022-10-11 10:44:51
 * @LastEditors  : shenqing
 * @FilePath     : \questionnaire\src\mixins\appmixins.js
 */
import syncAjax from '@/services/synchttp'
import { mapActions } from 'vuex'

/* eslint-disable */
export default{
  data(){
    return {}
  },
  created(){
      this.getConfig()
  },
  methods:{
    ...mapActions(['setServerConfig']),
    getConfig(){
      let baseConfig = syncAjax({
        type: 'GET',
        noAuth: false,
        url: 'serverconfig.json'
      })
      let baseConfigObj = JSON.parse(baseConfig)
      /*eslint-disable */
      let config = baseConfigObj
      console.log(31,config)
      this.setServerConfig(config)
    }
  }
}
